#!/bin/bash
# 安装AWS SSM Agent脚本

echo "Installing AWS SSM Agent..."

# 更新系统包
sudo apt update

# 下载并安装SSM Agent
cd /tmp
wget https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/debian_amd64/amazon-ssm-agent.deb
sudo dpkg -i amazon-ssm-agent.deb

# 启动SSM Agent
sudo systemctl start amazon-ssm-agent
sudo systemctl enable amazon-ssm-agent

# 检查状态
sudo systemctl status amazon-ssm-agent

echo "SSM Agent installation completed!"

